home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 2 / Atari Mega Archive CD - Volume 2.iso / minix / up1510b.tgz / up1510b / include / setjmp.h < prev    next >
C/C++ Source or Header  |  1990-07-15  |  851b  |  31 lines

  1. /* The <setjmp.h> header relates to the C phenomenon known as setjmp/longjmp.  
  2.  * It is used to escape out of the current situation into a previous one.  
  3.  * A typical example is in an editor, where hitting DEL breaks off the current 
  4.  * command and puts the editor back in the main loop.
  5.  */
  6.  
  7. #ifndef _SETJMP_H
  8. #define _SETJMP_H
  9.  
  10. #define _JBLEN 16        /* enough for all machines */
  11.  
  12. typedef char *jmp_buf[_JBLEN];
  13.  
  14. /* Function Prototypes. */
  15. #ifndef _ANSI_H
  16. #include <ansi.h>
  17. #endif
  18.  
  19. _PROTOTYPE( int setjmp, (jmp_buf __env)                    );
  20. _PROTOTYPE( void longjmp, (jmp_buf __env, int __val)            );
  21.  
  22. #ifdef _POSIX_SOURCE
  23. typedef sigjmp_buf[_JBLEN+1];    /* regular stuff plus mask */
  24.  
  25. _PROTOTYPE( int sigsetjmp, (sigjmp_buf __env, int __savemask)        );
  26. _PROTOTYPE( int siglongjmp, (sigjmp_buf __env, int __val)        );
  27.  
  28. #endif /* _POSIX_SOURCE */
  29.  
  30. #endif /* _SETJMP_H */
  31.